require 'test/unit'
require 'random'
require 'Seed'
require 'planet'

class TestPlanet < Test::Unit::TestCase
	
	def test_create
		r = RandomGenerator.new(12345)
		a1 = r.generateSequence()
		a2 = r.generateSequence()
	end
	
	def test_that_lave_is_the_seventh_planet_in_first_galaxy
		seed = Seed.get_base_seed()
		planets = Array.new()
		8.times { planets.push(Planet.new(seed)) }
		#planets.each { |p| puts p.name + "(" + p.x.to_s + "," + p.y.to_s + ")"}
		
		assert_equal('LAVE', planets[7].name)
	  
		assert_equal(20, planets[7].x)
		assert_equal(173, planets[7].y)
		assert_equal(3, planets[7].government_number)
		assert_equal(5, planets[7].economy_type)
		assert_equal(4, planets[7].tech_level)
		assert_equal(25, planets[7].population)
		assert_equal(7000, planets[7].productivity)
		assert_equal(4116, planets[7].radius)
	end
end